Skip to content

feat: add findConjunctions() utility to conjunction module in @observerly/astrometry - #389

Merged
michealroberts merged 1 commit into
mainfrom
feature/conjunction/findConjunctions
Aug 18, 2026
Merged

feat: add findConjunctions() utility to conjunction module in @observerly/astrometry#389
michealroberts merged 1 commit into
mainfrom
feature/conjunction/findConjunctions

Conversation

@michealroberts

Copy link
Copy Markdown
Member

feat: add findConjunctions() utility to conjunction module in @observerly/astrometry

@michealroberts michealroberts added enhancement New feature or request feature New feature labels Oct 10, 2024
@michealroberts michealroberts self-assigned this Oct 10, 2024
@michealroberts
michealroberts force-pushed the feature/conjunction/findConjunctions branch 2 times, most recently from 0839756 to 2fac1fe Compare November 10, 2024 14:51
@michealroberts
michealroberts force-pushed the feature/conjunction/findConjunctions branch from 2fac1fe to c0f3721 Compare August 18, 2026 20:34
@michealroberts
michealroberts requested a lite review from Copilot August 18, 2026 20:35
@michealroberts
michealroberts force-pushed the feature/conjunction/findConjunctions branch from c0f3721 to e77771e Compare August 18, 2026 20:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new findConjunctions() utility to the astrometry conjunction module, expanding conjunction searches beyond planets to include the Moon and two bright near-ecliptic stars (Spica and Regulus), with corresponding tests validating behavior like midpoint calculation and star precession.

Changes:

  • Add findConjunctions() to compute closest conjunctions per target-pair across an interval, including Moon + (Spica, Regulus) with star precession applied.
  • Add Vitest coverage for findConjunctions() behavior (pair-keying, midpoint correctness across RA=0, precession, and invalid step handling).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/conjunction.spec.ts Adds test coverage for the new findConjunctions() API and its expected behaviors.
src/conjunction.ts Implements findConjunctions() and adds Moon + star targets (with precession) into the conjunction search loop.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/conjunction.spec.ts Outdated
Comment thread src/conjunction.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/conjunction.ts:499

  • Inline ESLint configuration (/*eslint prefer-const: ...*/) inside the function is unusual and affects linting beyond this block. It’s not needed here; defining from/to explicitly avoids the rule interaction and keeps lint configuration centralized.
  /*eslint prefer-const: ["error", {"destructuring": "all"}]*/
  let { from, to } = interval

src/conjunction.ts:476

  • The JSDoc lists horizon, angularSeparationThreshold, and stepMinutes as standalone parameters, but the function actually accepts a single params object. Also, angularSeparationThreshold is used as a maximum separation (see isConjunction()), so documenting it as a “minimum” is misleading.
 * @param interval - The interval to search for the initial conjunction.
 * @param observer - The geographic coordinate of the observer.
 * @param horizon - The minimum altitude of the targets above the horizon.
 * @param angularSeparationThreshold - The minimum angular separation for conjunction.
 * @param stepMinutes - The step size in minutes for checking conjunction.

@michealroberts
michealroberts force-pushed the feature/conjunction/findConjunctions branch from 519c2b1 to baf631d Compare August 18, 2026 20:51
@michealroberts
michealroberts merged commit 29c66fd into main Aug 18, 2026
5 checks passed
@michealroberts
michealroberts deleted the feature/conjunction/findConjunctions branch August 18, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants